<template>
  <div>
        <!-- 分页 -->
        <el-pagination
          background
          v-show="!isLoading"
          layout="prev, pager, next"
          :current-page="currentPage"
          :page-size="pageSize"
          :total="textList.length"
          @current-change="CurrentPageChange"
        >
        </el-pagination>
  </div>
</template>

<script>
import { mapState, mapGetters, mapActions, mapMutations } from "vuex";
export default {
  name: "Pagination",
  data() {
    return {};
  },
  computed: {
    ...mapState("search", ["pageSize", "currentPage", "isLoading"]),
    ...mapGetters("search", ["textList"]),
  },
  methods: {
    ...mapActions("search", ["CurrentPageChange"]),
    ...mapMutations("search", ["CurrentPageChange"]),
  },
};
</script>

<style scoped>
/* 分页 */
.el-pagination {
  margin-top: 10px;
  text-align: center;
}
/* 下一页 */
.next-button{
  margin-top: 0px;
}
</style>